package Opgave2;

import java.util.LinkedList;
import java.util.List;

public class PrintQueue{

	Object obj = new Object();

	private List<PrintJob> jobs = new LinkedList<PrintJob>();

	public void addJob(PrintJob pj){
		System.out.println("adding " + pj);
		jobs.add(pj);
	}

	public PrintJob removeJob(){
		if (this.size() != 0) {
			System.out.print("removing ");
			return jobs.remove(0);
		} else {
			return null;
		}
	}

	public int size(){
		return jobs.size();
	}

}